var flag = true;
Page({
  
  data: {
    color:'hello'
  },
  onLoad: function (options) {
    console.log("index2 onload")
  },
  onReady: function () {
    console.log("index2 onReady")
  },
  onShow: function () {
    console.log("index2 onShow")
  },
  onHide: function () {
    console.log("index2 onHide")
  },
  onUnload() {
    console.log("index2 onUnload")
  },
  click:function(){
    let color
    console.log("点击了text")
    if(flag){
      color='helloyellow';
      flag=false;
    }else{
      color='hello';
      flag=true;
    }
    this.setData({
      color
    });
  }
})